<template>
  <div class="history">
    <header>
      <div class="back" @click="$router.go(-1)"></div>
      <span>浏览记录</span>
    </header>
    <van-card v-for="(item, index) in list" :key="index"
      :price="item.price"
      :title="item.title"
      :thumb="item.img"
    />
  </div>
</template>

<script>
export default {
    data() {
    return {
      list: [
        {
          id: 0,
          title: "HUAWEI P50 Pro",
          img: "https://res.vmallres.com/pimages/uomcdn/CN/pms/202203/gbom/6941487247271/428_428_81D040DB3641C37B787CC658015DEA4Cmp.png",
          count: 1,
          price: 6488,
          check: true,
        },
        {
          id: 1,
          title: "HUAWEI MateBook 14 2021款",
          img: "https://res.vmallres.com/pimages/product/6941487210565/428_428_0586DDD43A796BB8F9DCE0CF38A3C248212C18CA891A2AB9mp.png",
          count: 1,
          price: 5199,
          check: true,
        },
        {
          id: 2,
          title: "HUAWEI WATCH GT 3",
          img: "https://res.vmallres.com/pimages/product/6941487224364/428_428_EF8C02B11B0053549E1A0766706AFB8910ED4B828F655657mp.png",
          count: 1,
          price: 1488,
          check: true,
        },
        {
          id: 3,
          title: "HUAWEI MATE Xs 2",
          img: "https://res8.vmallres.com/pimages/uomcdn/CN/pms/202204/gbom/6941487261352/428_428_79227E5C15D7A07A0E513B8737074254mp.png",
          count: 1,
          price: 9999,
          check: true,
        },
        {
          id: 4,
          title: "HUAWEI Mate 40 Pro(5G)",
          img: "https://res.vmallres.com/pimages/uomcdn/CN/pms/202204/gbom/6941487262588/428_428_1A02B9087631E58398614E3CDE63ACB1mp.png",
          count: 1,
          price: 6988,
          check: true,
        },
      ],
    };
  },
};
</script>

<style scoped>
header {
  width: 100%;
  height: 100px;
  border-bottom: 1px solid #c0c0c0;
  text-align: center;
}
header .back {
  float: left;
  margin-top: 32.5px;
  margin-left: 20px;
  width: 19px;
  height: 35px;
  background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/pshvf6oyob5e2v34gvjdf963utrfrmi7si6b18e2f0-ee71-4c15-a09d-11de00a665d4) -1px -1px
    no-repeat;
  background-size: 20px 37px;
}
header span {
  line-height: 100px;
  font-size: 30px;
}
.van-card__title{
  max-height: 60px;
  font-size: 15px;
}
.van-card__desc{
  height: 60px;
  margin-top: 20px;
  line-height: 30px;
  max-height: 100px;
}
.van-card__thumb {
  height: 100px;
  width: 100px;
}
.van-card__title {
  line-height: 50px;
}
</style>
